/*
 * @Author: upp24 1246815351@qq.com
 * @Date: 2023-06-17 08:31:30
 * @LastEditors: upp24 1246815351@qq.com
 * @LastEditTime: 2023-12-28 13:38:33
 * @FilePath: /pure-admin-thin-i18n/src/api/activity.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";
export type BannerResult = {
  page: number;
  pagesize: number;
  success: boolean;
  code: number;
  token: string;
  msg: string;
  data: {
    img(img: any): string;
    data: any[];
    total: number;
    page: number;
    pagesize: number;
  };
};
/** 活动列表*/
export const activityList = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("meeting/list"), {
    data
  });
};
/**活动发起人 */
export const activityUser = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("user/meeting/user"), {
    data
  });
};
/** 活动详情*/
export const activityDetail = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("meeting/info"), {
    data
  });
};
/**状态修改 */
export const activityCheck = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("meeting/check"), {
    data
  });
};
/** 活动修改*/
export const activityUpdate = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("meeting/update"), {
    data
  });
};
/**座位图状态 */
export const activitySeat = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("meeting/seat"), {
    data
  });
};
/**所有用户信息 */
export const activityAllUser = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("meeting/all"), {
    data
  });
};
/** 活动删除*/
export const activityDelete = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("meeting/delete"), {
    data
  });
};
/**指定团队 */
export const activityTeam = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("user/nickName"), {
    data
  });
};

/**元旦活动 */
export const activityYD = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("draw/list"), {
    data
  });
};
/**抽奖查看 */
export const activityYDCheck = (data?: object) => {
  return http.request<BannerResult>("post", baseUrlApi("draw/user/list"), {
    data
  });
};
